package com.tza.web.t_net.shared.entity;

import java.io.Serializable;
import java.util.Date;

public class Data implements Serializable
{

   /**
    * 
    */
   private static final long serialVersionUID = -355130526599202869L;

   private String            key;

   private String            stringValue      = null;

   private Date              dateValue        = null;

   private Double            doubleValue      = null;

   private DataMap           dataMapValue;

   public final String getKey()
   {
      return key;
   }

   public final void setKey(String key)
   {
      this.key = key;
   }

   public final Object getValue()
   {

      if (stringValue != null) return stringValue;
      if (doubleValue != null) return doubleValue;
      if (dateValue != null) return dateValue;
      if (dataMapValue != null) return dataMapValue;
      return stringValue;
   }

   public final void setValue(String value)
   {
      this.stringValue = value;
   }

   public final void setValue(Date value)
   {
      this.dateValue = value;
   }

   public final void setValue(Double value)
   {
      this.doubleValue = value;
   }

   public void setValue(DataMap value)
   {
      this.dataMapValue = value;

   }

}
